<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%> 
<%@ page import="java.text.SimpleDateFormat"%> 
<%@ page import="com.nmes.naljava.entity.*"%>
<%
	//Account a = (Account)request.getAttribute("Account");  // 단일 정보
	List<Account> list = (List<Account>)request.getAttribute("list"); //리스트 객체를 전달 받는다.
	SimpleDateFormat sdf = new SimpleDateFormat("M/d/yyyy");
%>
<html> 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>날자바 리스트</title>
</head> 
<body>
		<p> <a href="SaveData?action=boardList2">리스트 보기2</a></p>
		<table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC" >
		<tr bgcolor="#407BA8"> 
			<td style="color: #ffffff; font-weight: bold;">제목</td> 
			<td style="color: #ffffff; font-weight: bold;">카테고리</td>
			<td style="color: #ffffff; font-weight: bold;">내용</td>
			<td style="color: #ffffff; font-weight: bold;">이미지</td> 
			<td style="color: #ffffff; font-weight: bold;">작성자</td> 
		</tr>		
			<% Account a = (Account)list.get(0); %>
			<tr style="background:#ffffff" onMouseOver="this.style.background='#eeeeee';" onMouseOut="this.style.background='#ffffff';">
				<td><%=a.getTitle() %></td>
				<td><%= a.getCategory() %></td> 
				<td><%= a.getContent() %></td> 
				<td> <img src="/ImageSource?id=<%= a.getId() %>" /> </td>
				<td><%= a.getWriter() %></td>
			</tr> 

		</table>

	<p/>
</body> 
</html>